<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>construct and prototype</title>
    <script type="text/javascript">
    function Student(name) {
        this.name = name;
        this.hello = function() {
            alert('Hello, ' + this.name + '!');
        }
    }

    var xiaoming = new Student('小明');

     // xiaoming 的原型属性 指向 Student 对象的原型对象
     // 原型对象的构造器属性 指向了 Student的构造函数
     
    </script>
</head>

<body>
</body>

</html>
